using UnityEngine;
using System.Collections;
using LoopType = iTween.LoopType;
using EaseType = iTween.EaseType;

public class Follower : MonoBehaviour 
{
    private Vector3[] pathToFollow;
    private string m_PathToMove;
    private float m_position;
    private float m_speed = 10;
    private LoopType m_loop = LoopType.loop;
    private EaseType m_ease = EaseType.easeInOutSine;

	// Use this for initialization
	void Start () 
    {
	    //get a path from the path manager
        pathToFollow = PathManager.Instance.GetPath("path");
        
        //if we have a valid path
        if (pathToFollow != null)
        {
            //set the object to the initial position
            transform.position = pathToFollow[0];

            //start moving around the path
            iTween.MoveTo(gameObject, iTween.Hash("path", pathToFollow, "speed", m_speed, "easetype", m_ease, "looptype", m_loop));
        }

	}
	
	// Update is called once per frame
	void Update ()
    {
	
	}
}
